package com.czxy.rbac;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_user")
public class SysUser {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String username;
    private String realname;
    private String password;
    private Integer age;
    private String phone;

    private Integer provinceId;
    private Integer cityId;
    private Integer areaId;
    private String detailAddress;
    private Date createTime;
    private Date updateTime;
    private Integer createId;


//    @TableField(exist = false)
//    @JsonInclude(JsonInclude.Include.NON_EMPTY)
//    private List<SysRole> roleList = new ArrayList<>();
//
    @TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Integer> roleIds = new ArrayList<>();






}
